﻿@using Mulala.Cavan.Domain.MainBoundedContext.LogModule
@using Mulala.Cavan.Core.Extension
@model Mulala.Cavan.Presentation.Mvc.ViewModel.IVisitHistorysViewModel

<div id="divkan">
    <dl>
        @{
            var visitorAvatar = string.Empty;
            var visitorLogo = string.Empty;
        }
        @foreach (IVisitHistoryViewModel vh in @Model.Visitors)
        {
            if (vh.VisitorAvatar.IsNotEmpty())
            {
                visitorAvatar = vh.VisitorAvatar + "_100@100.jpg";
   
            <dt>
                <img src="@visitorAvatar" width="75" height="80" class="dtimg" alt=""/></dt>
        
            }
            else
            {
                visitorLogo = vh.VisitorLogo + "_100@100.jpg";
            <dt>
                <img src="@visitorLogo" width="75" height="80" class="dtimg" alt=""/></dt>
            } 
            <dd>@vh.Item.Visitor.Name</dd>
        }
    </dl>
</div>
